package com.hospital.centerone.service.Impl;


import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.hospital.centerone.dao.DepartmentDao;
import com.hospital.centerone.entity.Departments;
import com.hospital.centerone.service.DepartmentService;

import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional
public class DepartmentServiceImpl implements DepartmentService {
    @Resource
    private DepartmentDao departmentDao;
    @Override
    public List<Departments> departmentList(Departments departments) {
        return departmentDao.departmentList(departments);
    }

    @Override
    public int deleteDepartment(Integer departmentId) {
        return departmentDao.deleteDepartment(departmentId);
    }

    @Override
    public int addDepartment(Departments departments) {
        return departmentDao.addDepartment(departments);
    }


    @Override
    public int count(Departments departments) {
        return departmentDao.count(departments);
    }

    @Override
    public int checkCount(Integer departmentId) {
        return departmentDao.checkCount(departmentId);
    }

	@Override
	public int editDepartment(Departments departments) {
		// TODO Auto-generated method stub
		return departmentDao.editDepartment(departments);
	}
}
